package com.dabai.videobrowser.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.dabai.videobrowser.R;
import com.dabai.videobrowser.bean.PreviewModel;

import java.util.List;

/**
 * Description : Other
 *
 * @author BAI
 */
public class PreviewAdapter extends BaseQuickAdapter<PreviewModel, BaseViewHolder> {

    public PreviewAdapter(@Nullable List<PreviewModel> data) {
        super(R.layout.item_drawer_main_start, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, PreviewModel previewModel) {
        baseViewHolder.setText(R.id.textView1,  previewModel.getDateStr());
        baseViewHolder.setImageBitmap(R.id.imageView1, previewModel.getFrame());
    }
}
